package com.easywan.pojo;

import java.util.List;

public class Result<T> implements IResult{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int code;
	private String msg;
	private List<T> models;
	private Object model;
	private PageRow page;
	

	public Result(int code2, String message,Object model, List<T> model2) {
		this.code = code2;
		this.msg = message;
		this.models = model2;
		this.model = model;
	}
	
	public Result(Integer successCode, String msg2, Object model2, List<T> models2, PageRow page) {
		this(successCode,msg2,model2,models2);
		this.page = page;
	}

	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public List<T> getModels() {
		return models;
	}
	public void setModels(List<T> models) {
		this.models = models;
	}
	public Object getModel() {
		return model;
	}
	public void setModel(T model) {
		this.model = model;
	}
	public PageRow getPage() {
		return page;
	}

	public void setPage(PageRow page) {
		this.page = page;
	}

	@Override
	public String toString() {
		return "Result [code=" + code + ", msg=" + msg + ", models=" + models + ", model=" + model + ", page=" + page
				+ "]";
	}
	
	
}
